<template>
    <div layout="inline">
      <a-card style="margin-top: 12px;" :bordered="false">
          <a-tabs defaultActiveKey="1">
            <a-tab-pane tab="基本信息" key="1">
             <arc-account-form ref="realForm" :accCode="accModel.accCode" :disabled="true"></arc-account-form>
            </a-tab-pane>                
            <a-tab-pane tab="抄表记录" key="3">
              <mr-records-list :accCode="accModel.accCode"></mr-records-list>
            </a-tab-pane>
            <a-tab-pane tab="换表记录" key="4">              
              <arc-meter-replaces-list :accCode="accModel.accCode"></arc-meter-replaces-list>
            </a-tab-pane>
            <a-tab-pane tab="缴费记录" key="5">
              <chg-payments-list :accCode="accModel.accCode" ></chg-payments-list >
            </a-tab-pane>
            <a-tab-pane tab="收费记录" key="6">
              <chg-fees-list :accCode="accModel.accCode"></chg-fees-list>
            </a-tab-pane>
           <a-tab-pane tab="欠费记录" key="7">
              <chg-arrears-list :accCode="accModel.accCode" ></chg-arrears-list>
            </a-tab-pane>
           <!-- 
            <a-tab-pane tab="账号流水" key="8">
              <chg-storeds-list :accCode="accModel.accCode" ></chg-storeds-list>           
            </a-tab-pane>
             -->
        </a-tabs>
      </a-card>
    </div>
</template>

<script>
  import { getAction } from '@/api/manage'
  import arcAccountForm from './modules/ArcAccountForm'
  import mrRecordsList from '../read/MrRecordsList'
  import chgPaymentsList from '../chg/ChgPaymentsList'
  import chgFeesList from '../chg/ChgFeesList'
  import chgArrearsList from '../chg/ChgArrearsList'
  import chgStoredsList from '../chg/ChgStoredsList'
  import arcMeterReplacesList from './ArcMeterReplacesList'

export default {
    name: "ArcAccRelatedInfo",
    description: '账号相关信息Tab页面',
    components: {
      arcAccountForm,
      mrRecordsList,
      chgPaymentsList,
      chgFeesList,
      chgArrearsList,
      chgStoredsList,
      arcMeterReplacesList
    },
    data () {
      return {
        accModel:{
          accountId:'',
          accCode:''
        },
        url: {        
          queryById: ""
        }
        
      }
    },   
    created () { 
      let id = this.$route.params.code;
      if(id && id != undefined ){
        this.accModel.accCode=id;
      } 
    },
    methods:{     
      submitCallback(){ 
      },
      loadBaseData(){
        const that = this;      
        let param={
          userCode: this.userCode
        }
        getAction(that.url.queryById,param).then((res)=>{ 
          if(res.success){
            that.userModel=res.result; 
          }else{
            that.$message.warning(res.message);
          }
        })
      },
    }
}
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>